package com.ruoyi.wisdom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wisdom.mapper.IotSchoolClassesMapper;
import com.ruoyi.wisdom.domain.IotSchoolClasses;
import com.ruoyi.wisdom.service.IIotSchoolClassesService;

/**
 * 班级Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-31
 */
@Service
public class IotSchoolClassesServiceImpl implements IIotSchoolClassesService 
{
    @Autowired
    private IotSchoolClassesMapper iotSchoolClassesMapper;

    /**
     * 查询班级
     * 
     * @param id 班级主键
     * @return 班级
     */
    @Override
    public IotSchoolClasses selectIotSchoolClassesById(Long id)
    {
        return iotSchoolClassesMapper.selectIotSchoolClassesById(id);
    }

    /**
     * 查询班级列表
     * 
     * @param iotSchoolClasses 班级
     * @return 班级
     */
    @Override
    public List<IotSchoolClasses> selectIotSchoolClassesList(IotSchoolClasses iotSchoolClasses)
    {
        return iotSchoolClassesMapper.selectIotSchoolClassesList(iotSchoolClasses);
    }

    /**
     * 新增班级
     * 
     * @param iotSchoolClasses 班级
     * @return 结果
     */
    @Override
    public int insertIotSchoolClasses(IotSchoolClasses iotSchoolClasses)
    {
        iotSchoolClasses.setCreateTime(DateUtils.getNowDate());
        return iotSchoolClassesMapper.insertIotSchoolClasses(iotSchoolClasses);
    }

    /**
     * 修改班级
     * 
     * @param iotSchoolClasses 班级
     * @return 结果
     */
    @Override
    public int updateIotSchoolClasses(IotSchoolClasses iotSchoolClasses)
    {
        iotSchoolClasses.setUpdateTime(DateUtils.getNowDate());
        return iotSchoolClassesMapper.updateIotSchoolClasses(iotSchoolClasses);
    }

    /**
     * 批量删除班级
     * 
     * @param ids 需要删除的班级主键
     * @return 结果
     */
    @Override
    public int deleteIotSchoolClassesByIds(Long[] ids)
    {
        return iotSchoolClassesMapper.deleteIotSchoolClassesByIds(ids);
    }

    /**
     * 删除班级信息
     * 
     * @param id 班级主键
     * @return 结果
     */
    @Override
    public int deleteIotSchoolClassesById(Long id)
    {
        return iotSchoolClassesMapper.deleteIotSchoolClassesById(id);
    }
}
